package main

import (
	"bytes"
	"fmt"
	"io"
	"os"
)

func main() {

	var w io.Writer
	w = os.Stdout
	w = new(bytes.Buffer)
	w = nil
	fmt.Println(w)
	fmt.Println(&w)
	if w != nil {

	}

	var b *bytes.Buffer
	fmt.Println(b == nil)
	f(b)
}

func f(b io.Writer) {
	fmt.Println(b == nil)
	if b != nil {
		b.Write([]byte("hello \n"))
	}
}
